<?php include_once './application/views/sys_admin/common/header.php';  ?>
<!-- admin_main -->
<div class="admin_main">
	<!-- Admin_top end -->
	<?php include_once './application/views/sys_admin/common/shop_left.php';  ?>
	<!-- Admin_Left End -->
	<div class="admin_right">
		<div class="admin_right_title">
			<strong>商城管理</strong> &gt;&gt;  商品列表
		</div>
		
		<div class="admin_right_con" >
			<table border="0" cellspacing="1" cellpadding="0">
			  <tr style="color:#0068b7;">
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>商品编号</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>商品名称</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>商品类型</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>积分价格</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>状态</strong></td>
				<!-- <td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>推荐</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>团购</strong></td> -->
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>热门</strong></td>
				<!--<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>抢购</strong></td> -->
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>已兑换</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>剩余</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>操作</strong></td>
			  </tr>
			  <?php foreach($list as $info){?>
			  <tr>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $info['id'];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $info['pname'];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $vars['types'][$info['ptype']];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $info['pcredit'];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $info['pstatus'] ? '已上架':'未上架';?></td>
				<!--<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $info['ptui'] ? '是':'否';?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $info['ptuan'] ? '是':'否';?></td>-->
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $info['phot'] ? '是':'否';?></td>
				<!--<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $info['prob'] ? '是':'否';?></td>-->
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $info['pconvert'];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $info['psurp'];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><a href="/sys_admin/shop/view/<?php echo $info['id'];?>">修改</a></td>
			  </tr>
			  <?php }?>
			  <tr>
			  	<td colspan="9" align="right" bgcolor="#FFFFFF">
			  		<form action="" method="get">
			  			商品名：<input type="text" id="pname" name="pname" value="<?php echo $parms['pname'];?>" />
			  			商品类型：<select id="ptype" name="ptype">
			  			<option value="" <?php if(!isset($parms['ptype']) || !$parms['ptype']){echo 'selected="selected"';}?>>全部</option>
			  			<?php foreach ($vars['types'] as $k => $v){?>
			  			<option value="<?php echo $k;?>" <?php if(isset($parms['ptype']) && $parms['ptype']==$k){echo 'selected="selected"';}?>><?php echo $v;?></option>
			  			<?php }?>
			  			</select>
			  		<!-- 	是否推荐：<select id="ptui" name="ptui">
			  			<?php foreach ($vars['ptui'] as $k => $v){?>
			  			<option value="<?php echo $k;?>" <?php if(isset($parms['ptui']) && $parms['ptui']==$k){echo 'selected="selected"';}?>><?php echo $k==0?'全部':$v;?></option>
			  			<?php }?>
			  			</select>
			  			是否参团：
			  			<select id="ptuan" name="ptuan">
			  			<?php foreach ($vars['ptuan'] as $k => $v){?>
			  			<option value="<?php echo $k;?>" <?php if(isset($parms['ptuan']) && $parms['ptuan']==$k){echo 'selected="selected"';}?>><?php echo $k==0?'全部':$v;?></option>
			  			<?php }?>
			  			</select> -->
			  			是否热门：
			  			<select id="phot" name="phot">
			  			<?php foreach ($vars['phot'] as $k => $v){?>
			  			<option value="<?php echo $k;?>" <?php if(isset($parms['phot']) && $parms['phot']==$k){echo 'selected="selected"';}?>><?php echo $k==0?'全部':$v;?></option>
			  			<?php }?>
			  			</select>
			  			<input type="submit"/>
			  		</form>
			  	</td>
			  </tr>
			  <tr>
			  	<td  height="35" colspan="12" align="center" class="page" bgcolor="#FFFFFF"><?php echo $this->pagination->create_links();?></td>
			  </tr>
			</table>
			
			</div>
	</div>
<!-- Admin_Right End -->
</div>
<!-- admin_main end -->
</body>
</html>
